<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>部门管理-树</title>
<link rel="stylesheet" href="/resources/zTree/css/metroStyle/metroStyle.css" type="text/css">
<script type="text/javascript" src="/resources/zTree/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/resources/zTree/js/jquery.ztree.core.js"></script>
</head>
<body>
	<div id="treeDept" class="ztree"></div>
</body>
<script type="text/javascript">
	function zTreeOnClick(event, treeId, treeNode) {
		//刷新
	    window.parent.main.reloadTable(treeNode.id);
	};
	var setting = {
			data: {
				simpleData: {
					enable: true
				}
			},
			callback: {
				onClick: zTreeOnClick
			}
		};
	function initTree(){
		$.post("/dept/loadDeptLeftTreeJson",function(zNodes){
			$.fn.zTree.init($("#treeDept"), setting, zNodes);
		});
	}
	initTree();
</script>
</html>